<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
</head>
<body>
  <div id="app">
      <div v-for='(item) in list'> {{item}}</div>
      <button @click='arr'>click</button>
  </div>
  <script src="./vue.js"></script>
  <script>
    var vm = new Vue({
      el:'#app',
      data:{
          list:['apple','melon','watermelon']
      },
      methods:{
          arr() {
            // this.list.push('lemon')
            // this.list.unshift("lemon")
            // this.list.pop()
            // this.list.shift()

        //    this.list.splice(0,1)
        // this.list.splice(0,0,'lemon')

        // this.list = this.list.filter(item => item == 'melon')

        // this.$set(this.list,5,'lemon')
        // this.$delete(this.list,1)
        // this.list = []
        // this.list[3] = 'dd'
        this.list = [...this.list,'add']

          }
      }
     });
  </script>
</body>
</html>
